<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>UCenter 接口开发手册 - 标签接口</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<link rel="stylesheet" href="images/style.css" type="text/css" media="all"/>
	<meta content="Comsenz Inc." name="Copyright"/>
	<script type="text/javascript" src="javascript/common.js"></script>
</head>
<body>
<script type="text/javascript" src="javascript/header.js"></script>

<h3>获取标签数据</h3>

<div class="submsg">
	<h4><i>{UCenterURL}</i>/api/?/tag/gettag</h4>
	<h5>请求参数</h5>
	<table border="0" cellspacing="0" cellpadding="0" class="msgtable">
		<thead>
		<tr>
			<th>参数</th>
			<td>含义</td>
		</tr>
		</thead>
		<tbody>
		<tr>
			<th><i>string</i> tagname</th>
			<td>标签名称</td>
		</tr>
		<tr>
			<th><i>array</i> nums</th>
			<td>
				指定每个应用返回多少条数据，数组格式如下：<br/>
				<table border="0" cellspacing="0" cellpadding="0" class="msgtable">
					<thead>
					<tr>
						<th>KEY</th>
						<td>VALUE</td>
					</tr>
					</thead>
					<tbody>
					<tr>
						<th>应用 ID</th>
						<td>返回数据条数</td>
					</tr>
					</tbody>
				</table>
			</td>
		</tr>
		</tbody>
	</table>

	<h5>返回值</h5>
	<table border="0" cellspacing="0" cellpadding="0" class="msgtable">
		<thead>
		<tr>
			<th>值</th>
			<td>含义</td>
		</tr>
		</thead>
		<tbody>
		<tr>
			<th><i>array</i></th>
			<td>标签数据，其中单条标签数组结构请参看<a href="tag.htm#table1">附表</a></td>
		</tr>
		</tbody>
	</table>

	<br/>
	本接口会向用户中心发起一个请求，要求获取用户中心中所有应用的标签数据。如果指定了
	totalnum，那么将按照用户中心标签设置中的数字按比例返回相应条目数，如果未指定每个应用将返回所有的 10 条数据。
</div>

<div class="line"></div>

<a name="table1"></a>
<h3>附表：单条标签数组结构</h3>

<div class="submsg">
	<table border="0" cellspacing="0" cellpadding="0" class="msgtable">
		<tbody>
		<tr>
			<th style="width:150px"><i>array</i> ['data']</th>
			<td>
				标签内容数组
				<table border="0" cellspacing="0" cellpadding="0" class="msgtable">
					<tbody>
					<tr>
						<th style="width:150px"><i>string</i> ['url']</th>
						<td>URL</td>
					</tr>
					<tr>
						<th style="width:150px"><i>string</i> ['subject']</th>
						<td>标题</td>
					</tr>
					<tr>
						<th style="width:150px"><i>string</i> ['extra']</th>
						<td>扩展数据</td>
					</tr>
					</tbody>
				</table>
			</td>
		</tr>
		<tr>
			<th style="width:150px"><i>integer</i> ['type']</th>
			<td>应用类型，值为 DISCUZ、SUPESITE、XSPACE、SUPEV、ECSHOP、OTHER</td>
		</tr>
		</tbody>
	</table>
</div>

<script type="text/javascript" src="javascript/footer.js"></script>
</body>
</html>